function selectListElements(listId) {
	var list = document.getElementById(listId);
	var i;
	for (i = list.length - 1; i >= 0; i--) {
		list.options[i].selected = 'selected';
	}
}

function moveSelectedElements(srcSelectId, dstSelectId) {
	var srcSelect = document.getElementById(srcSelectId);
	var dstSelect = document.getElementById(dstSelectId);
	var options = srcSelect.options;
	for (var i=0; i<options.length; i++) {
		if (options[i].selected) {
			try {
				dstSelect.add(options[i], null);
			} catch (ex) {
				var option = document.createElement("option");
				option.text = options[i].text;
				option.value = options[i].value;
				dstSelect.add(option);
				srcSelect.remove(i);
			}
			i--;
		}
	}
}